#ifndef _KP_MACRO_H_
#define _KP_MACRO_H_

#include <stdio.h>
#include <jni.h>
#include <android/log.h>

#define SAFE_DEL(x) if (x) { delete x; x = NULL; }
#define SAFE_DEL_ARRAY(x) if (x) { delete [] x; x = NULL; }


typedef signed char s8;
typedef unsigned char u8;

typedef signed short s16;
typedef unsigned short u16;

typedef signed int s32;
typedef unsigned int u32;


#define  LOG_TAG    "KataProfiler"
#define  LOGI(...)  __android_log_print(ANDROID_LOG_INFO,		LOG_TAG,	__VA_ARGS__)
#define  LOGE(...)  __android_log_print(ANDROID_LOG_ERROR,		LOG_TAG,	__VA_ARGS__)
#define  LOGD(...)  __android_log_print(ANDROID_LOG_DEBUG,		LOG_TAG,	__VA_ARGS__)
#define  LOGW(...)  __android_log_print(ANDROID_LOG_WARNING,	LOG_TAG,	__VA_ARGS__)


#endif
